package com.jinke.api.modules.third.easypost.model.request;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

/**
 * 请求参数类
 */

@Data
@JsonSerialize
public class CreateOrderRequest {
    @JsonProperty("carrier_accounts")
    private List<String> carrierAccounts;
    @JsonProperty("from_address")
    private Address sender;
    @JsonProperty("to_address")
    private Address recipient;
    @JsonProperty("parcel")
    private Parcel parcel;
    private Options options;
    private String service;
    private String insurance;


    @Data
    public static class Address {
        private String company;
        private String name;
        private String street1;
        private String street2;
        private String city;
        private String state;
        private String zip;
        private String phone;
        @ApiModelProperty("国家代码")
        private String country;
        private Boolean residential;
    }
    @Data
    public static class Parcel  {
        private String length;
        private String width;
        private String height;
        private String weight;
    }
    @Data
    public static class Options  {
        private String print_custom_1;
        private String print_custom_2;
        private String hazmat;
    }
}

